class MessageInfo2:
    # 一般在创建对象时执行，可以为空对象中初始化一些值
    def __init__(self, city):
        self.city = city
        self.company = "联通"

    def send_email(self, to_email):
        msg = "给{}的{}发送一个邮件".format(self.city, to_email)
        print(msg)


# 第1步：obj1 = 创建空对象
# 第2步：执行初始化  obj1.__init__(obj1, "江西")
obj1 = MessageInfo2("江西")
obj2 = MessageInfo2("青海")
obj1.send_email("x1")
obj2.send_email("x2")
